<?php 
/**
 * 微语部分
 */
if(!defined('EMLOG_ROOT')) {exit('error!');} 
?>
        <section id="content">
          <section class="vbox" id="bjax-el">
            <section class="scrollable">
              <section class="hbox stretch">
                <aside class="aside-lg bg-light lter b-r">
                  <section class="vbox">
                    <section class="scrollable">
                      <div class="wrapper">
					 <?php global $CACHE; 
					 $user_cache = $CACHE->readCache('user');
	                 $name = $user_cache[1]['mail'] != '' ? "<a href=\"mailto:".$user_cache[1]['mail']."\">".$user_cache[1]['name']."</a>" : $user_cache[1]['name'];?>
                        <div class="text-center m-b m-t">
						<?php if (!empty($user_cache[1]['photo']['src'])): ?>
                          <a href="" class="thumb-lg">
                            <img src="<?php echo BLOG_URL.$user_cache[1]['photo']['src']; ?>" class="img-circle">
                          </a>
						<?php endif;?>
                          <div>
                            <div class="h3 m-t-xs m-b-xs"><?php echo $name; ?></div>
                            <small class="text-muted"><i class="fa fa-map-marker"></i> Jiaxin, Chn</small>
                          </div>                
                        </div>
                        <div class="panel wrapper">
                          <div class="row text-center">
						 <?php global $CACHE;
	                           $sta_cache = $CACHE->readCache('sta'); ?>
                            <div class="col-xs-6">
                              <a href="#">
                                <span class="m-b-xs h4 block"><?php echo $sta_cache['lognum'];?></span>
                                <small class="text-muted">Logs</small>
                              </a>
                            </div>
                            <div class="col-xs-6">
                              <a href="#">
                                <span class="m-b-xs h4 block"><?php echo $sta_cache['twnum'];?></span>
                                <small class="text-muted">Twitters</small>
                              </a>
                            </div>
                          </div>
                        </div>
                        <div>
                          <small class="text-uc text-xs text-muted">about me</small>
                          <p><?php echo $user_cache[1]['des']; ?></p>
                          <div class="line"></div>
                          <small class="text-uc text-xs text-muted">connection</small>
                          <p class="m-t-sm">
						  <div class="bdsharebuttonbox">
							 <a href="#" class="bds_more" data-cmd="more"></a>
							 <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
							 <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
							 <a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
							 <a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a>
							 <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
						  </div>
                               <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"2","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
                          </p>
                        </div>
						<div class="btn-group btn-group-justified m-b">
						Theme by <a href="http://www.iuunet.com" title="采用emlog系统">D&C</a></br>
			            Powered by <a href="http://www.emlog.net" title="采用emlog系统" target="_blank" rel="nofollow">emlog</a> </br>
			            <a href="http://www.miibeian.gov.cn" target="_blank" rel="nofollow"><?php echo $icp; ?></a>
                        </div>
                      </div>
                    </section>
                  </section>
                </aside>
                <aside class="bg-white">
                  <section class="vbox">
                    <header class="header bg-light lt">
                      <ul class="nav nav-tabs nav-white">
                        <li class="active"><a href="#activity" data-toggle="tab">悠悠微语</a></li>
                        <li class=""><a href="#events" data-toggle="tab">新浪微博</a></li>
                        <li class=""><a href="#interaction" data-toggle="tab">腾讯微博</a></li>
                      </ul>
                    </header>
                    <section class="scrollable">
                      <div class="tab-content">
                        <div class="tab-pane active" id="activity">
                          <ul class="list-group no-radius m-b-none m-t-n-xxs list-group-lg no-border">
 <?php 
    foreach($tws as $val):
    $author = $user_cache[$val['author']]['name'];
    $avatar = empty($user_cache[$val['author']]['avatar']) ? 
                BLOG_URL . 'admin/views/images/avatar.jpg' : 
                BLOG_URL . $user_cache[$val['author']]['avatar'];
    $tid = (int)$val['id'];
    $img = empty($val['img']) ? "" : '<a title="查看图片" href="'.BLOG_URL.str_replace('thum-', '', $val['img']).'" target="_blank"><img style="border: 1px solid #EFEFEF;" src="'.BLOG_URL.$val['img'].'"/></a>';
    ?> 
                            <li class="list-group-item">
                              <a href="<?php echo $avatar; ?>" class="thumb-sm pull-left m-r-sm">
                                <img src="<?php if($img){echo BLOG_URL.$val['img'];}else{echo $avatar;}?>" class="img-circle">
                              </a>
                              <a href="javascript:loadr('<?php echo DYNAMIC_BLOGURL; ?>?action=getr&tid=<?php echo $tid;?>','<?php echo $tid;?>');" class="clear">
                                <small class="pull-right"><?php echo $val['date'];?></small>
                                <strong class="block"><?php echo $author; ?></strong>
								<?php if($val['replynum']){?>
								<span class="badge bg-danger pull-right" id="rn_<?php echo $tid;?>"><?php echo $val['replynum'];?></span>
								<?php }?>
                                <small><?php echo $val['t'].'<br/>'.$img;?></small>
                              </a>
                            </li>
					<ol><small id="r_<?php echo $tid;?>" style="display:none; margin-top:2%"></small></ol>


    <?php if ($istreply == 'y'):?>
    <article class="comment-item media" id="rp_<?php echo $tid;?>" style="display:none">
	 <section class="media-body">
      <form class="m-b-none">
	<div class="input-group" style="margin-left:2%; margin-bottom:2% ">
	    <input type="text" class="form-control" id="rtext_<?php echo $tid; ?>" placeholder="Input your comment here">
	
		<span class="input-group-btn">
        <button type="button" class="btn btn-primary" onclick="reply('<?php echo DYNAMIC_BLOGURL; ?>index.php?action=reply',<?php echo $tid;?>);"  /> POST</button>
		</span>
	</div>

        <div class="tinfo" style="margin-left:2%; margin-bottom:2%; display:<?php if(ROLE == ROLE_ADMIN || ROLE == ROLE_WRITER){echo 'none';}?>">

        <a href="#" class="btn btn-info">Name</a>
		<input type="text" class="btn btn-default" id="rname_<?php echo $tid; ?>" value="" />
        <span style="display:<?php if($reply_code == 'n'){echo 'none';}?>">
		<a href="#" class="btn btn-info">Captcha</a>
		<input type="text" class="btn btn-default" id="rcode_<?php echo $tid; ?>" value="" /><?php echo $rcode; ?>
		</span>        
        </div>
              <div class="msg"><span id="rmsg_<?php echo $tid; ?>" style="color:#FF0000"></span></div>
			  </form>
     </section>
    </article>
    <?php endif;?>
    <?php endforeach;?>

                          </ul>
	<ol id="pagenavi"><?php echo $pageurl;?><span></span></ol>
                        </div>
						<!-- 新浪微博开始 -->
                        <div class="tab-pane" id="events">
                          <div class="text-center wrapper">
<iframe width="100%" height="550" class="share_self"  frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=0&height=550&fansRow=1&ptype=1&speed=0&skin=5&isTitle=1&noborder=1&isWeibo=1&isFans=1&uid=5232216086&verifier=355a5b49&dpc=1"></iframe>
                          </div>
                        </div>
						<!-- 新浪微博结束 -->
						<!-- 腾讯微博开始 -->
                        <div class="tab-pane" id="interaction">
                          <div class="text-center wrapper">
<iframe frameborder="0" scrolling="no" src="http://show.v.t.qq.com/index.php?c=show&a=index&n=microdance&w=0&h=552&fl=1&l=30&o=23&co=4&cs=EDF2F3_FFFFFF_1A2B2A_EDF2F3" width="100%" height="500"></iframe>


                          </div>
                        </div>
						<!-- 新浪微博结束 -->
                      </div>
                    </section>
                  </section>
                </aside>
                <aside class="col-lg-3 b-l">
                  <section class="vbox">
                    <section class="scrollable padder-v">
                      <div class="panel">
                        <!--<h4 class="font-thin padder">Latest Tweets</h4>
                        <ul class="list-group">
                          
                          <li class="list-group-item">                     
                              <p><a href="#" class="text-info">@Josh Long</a> Vestibulum ullamcorper sodales nisi nec adipiscing elit. Morbi id neque quam. Aliquam sollicitudin venenatis</p>
                              <small class="block text-muted"><i class="fa fa-clock-o"></i> 2 hours ago</small>
                          </li>

                        </ul>-->
<?php echo side_log('0','6','date') ;?>
                      </div>

                      <div class="panel clearfix">
                        <div class="panel-body">
                          <a class="thumb pull-left m-r">
                          </a>
                          <div class="clear">
                           
                          </div>
                        </div>
                      </div>
                    </section>
                  </section>              
                </aside>
              </section>
            </section>
          </section>
          <a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen,open" data-target="#nav,html"></a>
        </section>
      </section>
    </section>    
  </section>
<?php
 include View::getView('footer');
?>